package org.artifact.core.context.json;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;

public class FastJson implements IJson {

	@Override
	public String toJson(Object object) {
		return JSON.toJSONString(object, SerializerFeature.WriteMapNullValue,SerializerFeature.WriteDateUseDateFormat);
//		return JSON.toJSONString(object);
	}

	@Override
	public <T> T parse(String jsonString, Class<T> type) {
//		JSONObject.toJSONString(jsonMap,SerializerFeature.WriteMapNullValue);
		return JSON.parseObject(jsonString, type);
	}

}
